<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>活动预览</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />

    <link rel="stylesheet" type="text/css" href="../static/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/fileinput.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/mystyle.css" />
    <script src="../static/js/jquery-2.1.4.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
    <script src="../static/js/fileinput.js"></script>
    <script src="../static/js/locales/zh.js"></script>
    <script src="../static/js/hello.js"></script>
</head>

<body class="docs-home" ontouchstart="">
    <style type="text/css">
        @media (min-width: 850px) {
            .docs-home .phone {
                /*margin: 0px 0px;*/
                margin: 10px auto !important;
            }
            .phone:before {
                content: "";
                width: 60px;
                height: 10px;
                border-radius: 10px;
                position: absolute;
                left: 50%;
                margin-left: -30px;
                background: #333;
                top: 50px;
            }
            .phone .statusbar {
                position: absolute;
                width: 320px;
                height: 20px;
                background: url("");
                left: 50%;
                margin-left: -160px;
                top: 100px;
                -webkit-background-size: 100% auto;
                background-size: 100% auto;
            }
            .phone:after {
                content: "";
                position: absolute;
                width: 60px;
                height: 60px;
                left: 50%;
                margin-left: -30px;
                bottom: 20px;
                border-radius: 100%;
                box-sizing: border-box;
                border: 5px solid #333;
            }
        }
        
        .phone {
            background: #111;
            border-radius: 0px;
            box-shadow: none;
            width: 100%;
            height: 568px;
            padding: 0;
        }
        
        .docs-home.mui-ios .phone .statusbar,
        .docs-home.mui-android .phone .statusbar,
        .docs-home.mui-ios .phone:before,
        .docs-home.mui-ios .phone:after {
            display: none;
        }
        
        .phone {
            margin: 0 auto;
            position: relative;
            background: #111;
            border-radius: 55px;
            box-shadow: 0px 0px 0px 2px #aaa;
            width: 320px;
            height: 568px;
            padding: 105px 25px;
            -webkit-box-sizing: content-box;
            box-sizing: content-box;
        }
        
        .phone iframe {
            width: 320px;
            height: 100%;
            display: block;
            width: 100%;
            margin-top: 20px;
        }
    </style>

    <style>
        .hide {
            display: none !important;
        }
        
        .fileBox {
            padding: 40px 0 20px 0;
            background: rgb(243, 240, 240);
        }
        
        .fileInfo {
            font-size: 14px;
            margin-bottom: 20px;
        }
        
        .close {
            width: 20px;
            height: 20px;
            position: absolute;
            right: 10px;
            top: 10px;
            /* background: url('../static/images/lyf1.jpg') no-repeat center center; */
            z-index: 99;
        }
        
        .baseImg {
            width: 200px;
            height: 200px;
            display: inline-block;
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
        }
        
        .inputBox {
            width: 350px;
            height: 500px;
            position: relative;
            margin-bottom: 30px;
            cursor: pointer;
            left: 800px;
            top: 100px;
            /* bottom: 200px; */
        }
        
        .fileInput {
            width: 100%;
            height: 100%;
            opacity: 0;
            cursor: pointer;
        }
        
        .add {
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
            width: 200px;
            height: 200px;
            line-height: 200px;
            text-align: center;
            border: 2px solid #9cc7f2;
            font-size: 40px;
            color: #b4b4b4;
        }
        
        .wait {
            display: block;
            width: 200px;
            height: 40px;
            margin: 30px 0 0 160px;
            text-decoration: underline !important;
        }
        
        .fileInfo {
            text-decoration: none;
            color: #36e954;
            font-size: 200%;
        }
    </style>

    <style>
        /* CSS RESET */
        
        * {
            padding: 0;
            margin: 0;
        }
        
        body {
            font: 12px "微软雅黑", Arial;
            background: #efeff4;
            min-width: 320px;
            max-width: 10240px;
            color: #000;
        }
        
        a {
            text-decoration: none;
            color: #666666;
        }
        
        a,
        img {
            border: none;
        }
        
        img {
            vertical-align: middle;
        }
        
        ul,
        li {
            list-style: none;
        }
        
        em,
        i {
            font-style: normal;
        }
        
        .clear {
            clear: both;
        }
        
        .clear_wl:after {
            content: ".";
            height: 0;
            visibility: hidden;
            display: block;
            clear: both;
        }
        
        .fl {
            float: left;
        }
        
        .fr {
            float: right;
        }
        
        .all_w {
            width: 91.3%;
            margin: 0 auto;
        }
        /*基础字体属性*/
        
        .f10 {
            font-size: 10px;
        }
        
        .f11 {
            font-size: 11px;
        }
        
        .f12 {
            font-size: 12px;
        }
        
        .f14 {
            font-size: 14px;
        }
        
        .f13 {
            font-size: 13px;
        }
        
        .f16 {
            font-size: 16px;
        }
        
        .f18 {
            font-size: 18px;
        }
        
        .f20 {
            font-size: 20px;
        }
        
        .f22 {
            font-size: 22px;
        }
        
        .f24 {
            font-size: 24px;
        }
        
        .f26 {
            font-size: 26px;
        }
        
        .f28 {
            font-size: 28px;
        }
        
        .f32 {
            font-size: 32px;
        }
        
        .fb {
            font-weight: bold;
        }
        /********/
        
        .header {
            background: #393a3e;
            color: #f5f7f6;
            height: auto;
            overflow: hidden;
        }
        
        .gofh {
            float: left;
            height: 45px;
            display: -webkit-box;
            -webkit-box-orient: horizontal;
            -webkit-box-pack: center;
            -webkit-box-align: center;
        }
        
        .gofh a {
            padding-right: 10px;
            border-right: 1px solid #2e2f33;
        }
        
        .gofh a img {
            width: 40%;
        }
        
        .ttwenz {
            float: left;
            height: 45px;
        }
        
        .ttwenz h4 {
            font-size: 16px;
            font-weight: 400;
            margin-top: 2px;
        }
        
        .ttwenz h5 {
            font-size: 12px;
            font-weight: 400;
            color: #6c7071;
        }
        
        .wenx_xx {
            text-align: center;
            font-size: 16px;
            padding: 18px 0;
        }
        
        .wenx_xx .wxzf_price {
            font-size: 45px;
        }
        
        .skf_xinf {
            height: 43px;
            border-top: 1px solid #ddd;
            border-bottom: 1px solid #ddd;
            line-height: 43px;
            background: #fff;
            font-size: 12px;
            overflow: hidden;
        }
        
        .skf_xinf .bt {
            color: #767676;
            float: left;
        }
        
        .ljzf_but {
            border-radius: 3px;
            height: 45px;
            line-height: 45px;
            background: #44bf16;
            display: block;
            text-align: center;
            font-size: 20px;
            margin-top: 50px;
            color: #fff;
        }
        /**/
        
        .ftc_wzsf {
            display: none;
            width: 100%;
            height: 100%;
            position: fixed;
            z-index: 999;
            top: 0;
            left: 0;
        }
        
        .ftc_wzsf .hbbj {
            width: 100%;
            height: 100%;
            position: absolute;
            z-index: 8;
            background: #000;
            opacity: 0.4;
            top: 0;
            left: 0;
        }
        
        .ftc_wzsf .srzfmm_box {
            position: absolute;
            z-index: 10;
            background: #f8f8f8;
            width: 88%;
            left: 50%;
            margin-left: -44%;
            top: 25px;
        }
        
        .qsrzfmm_bt {
            font-size: 16px;
            border-bottom: 1px solid #c9daca;
            overflow: hidden;
        }
        
        .qsrzfmm_bt a {
            display: block;
            width: 10%;
            padding: 10px 0;
            text-align: center;
        }
        
        .qsrzfmm_bt img.tx {
            width: 10%;
            padding: 10px 0;
        }
        
        .qsrzfmm_bt span {
            padding: 15px 5px;
        }
        
        .zfmmxx_shop {
            text-align: center;
            font-size: 12px;
            padding: 10px 0;
            overflow: hidden;
        }
        
        .zfmmxx_shop .mz {
            font-size: 14px;
            float: left;
            width: 100%;
        }
        
        .zfmmxx_shop .wxzf_price {
            font-size: 24px;
            float: left;
            width: 100%;
        }
        
        .blank_yh {
            width: 89%;
            margin: 0 auto;
            line-height: 40px;
            display: block;
            color: #636363;
            font-size: 16px;
            padding: 5px 0;
            overflow: hidden;
            border-bottom: 1px solid #e6e6e6;
            border-top: 1px solid #e6e6e6;
        }
        
        .blank_yh img {
            height: 40px;
        }
        
        .ml5 {
            margin-left: 5px;
        }
        
        .mm_box {
            width: 89%;
            margin: 10px auto;
            height: 40px;
            overflow: hidden;
            border: 1px solid #bebebe;
        }
        
        .mm_box li {
            border-right: 1px solid #efefef;
            height: 40px;
            float: left;
            width: 16.3%;
            background: #fff;
        }
        
        .mm_box li.mmdd {
            background: #fff url(images/dd_03.jpg) center no-repeat;
            background-size: 25%;
        }
        
        .mm_box li:last-child {
            border-right: none;
        }
        
        .xiaq_tb {
            padding: 5px 0;
            text-align: center;
            border-top: 1px solid #dadada;
        }
        
        .numb_box {
            position: absolute;
            z-index: 10;
            background: #f5f5f5;
            width: 100%;
            bottom: 0px;
        }
        
        .nub_ggg {
            border: 1px solid #dadada;
            overflow: hidden;
            border-bottom: none;
        }
        
        .nub_ggg li {
            width: 33.3333%;
            border-bottom: 1px solid #dadada;
            float: left;
            text-align: center;
            font-size: 22px;
        }
        
        .nub_ggg li a {
            display: block;
            color: #000;
            height: 50px;
            line-height: 50px;
            overflow: hidden;
        }
        
        .nub_ggg li a:active {
            background: #e0e0e0;
        }
        
        .nub_ggg li a.zj_x {
            border-left: 1px solid #dadada;
            border-right: 1px solid #dadada;
        }
        
        .nub_ggg li span {
            display: block;
            color: #e0e0e0;
            background: #e0e0e0;
            height: 50px;
            line-height: 50px;
            overflow: hidden;
        }
        
        .nub_ggg li span.del img {
            width: 30%;
        }
        
        .fh_but {
            position: absolute;
            right: 0px;
            top: 12px;
            font-size: 14px;
            color: #20d81f;
        }
        
        .zfcg_box {
            background: #f2f2f2;
            height: 56px;
            line-height: 56px;
            font-size: 20px;
            color: #1ea300;
        }
        
        .zfcg_box img {
            width: 10%;
        }
        
        .cgzf_info {
            background: #fff;
            border-top: 1px solid #dfdfdd;
        }
        
        .spxx_shop {
            background: #fff;
            margin-left: 4.35%;
            border-top: 1px solid #dfdfdd;
            padding: 10px 0;
        }
        
        .spxx_shop td {
            color: #7b7b7b;
            font-size: 14px;
            padding: 10px 0;
        }
        
        .wzxfcgde_tb {
            position: fixed;
            width: 100%;
            z-index: 999;
            bottom: 20px;
            text-align: center;
        }
        
        .wzxfcgde_tb img {
            width: 20.6%;
        }
        
        .mlr_pm {
            margin-right: 4.35%;
        }
    </style>

    <div class="docs-header">
        <div style="max-width:1024px;margin:0 auto;">
            <div class="phone">
                <div class="fileBox">
                    <div class="fileInfo" align="center">添加面容支付</div>
                    <!-- <div class="circle" style="margin-left: 60px;">
                    <img src="../static/images/shibie.png" />
                </div> -->
                    <!-- <div class="inputBox"> -->
                    <form method="POST" action="http://localhost:3000/upload" enctype="multipart/form-data">
                        <input type="file" name="the_file" class="fileInput" id="user-photo" />
                        <div id="show-picture" align="center" style="width: 200px;height: 200px;margin-left: 60px;background-image:url(../static/images/shibie.png) "></div>
                        <input class="ljzf_but all_w wait xiahuaxian btn  button-new" style="margin-top:100px" placeholder="输入人脸的名字" type="text" name="face_id" />
                        <!-- <iframe src="../static/images/lyf1.jpg" frameborder="0" scrolling="yes"></iframe> -->
                        <input type="submit" value="确认添加" class="ljzf_but all_w wait xiahuaxian btn  button-new" style="margin-top:20px" />
                        <!-- <a href="javascript:void(0);" class="ljzf_but all_w" style="margin-top:50px">确认添加</a>  -->
                    </form>
                </div>
                <!-- </div> -->

                <div class="statusbar"></div>
            </div>
        </div>
    </div>

    <script src="../static/js/jquery-2.1.4.min.js"></script>
    <script>
        var getUserPhoto = document.getElementById("user-photo");
        getUserPhoto.onchange = function() {
            var file = this.files;
            console.log(file);
            var reader = new FileReader();
            reader.readAsDataURL(file[0]);
            reader.onload = function() {
                var image = document.createElement("img");
                image.width = "150";
                image.src = reader.result;
                var showPicture = document.getElementById("show-picture");
                showPicture.append(image);
            };
        };
    </script>
    <script>
        function inputChange(picId, imgId, addId, closeId) {
            var files = document.getElementById(picId).files;
            console.log(files);

            if (files.length == 0) return;
            var form = new FormData(),
                file = files[0];
            form.append("file", file);

            var reader = new FileReader();
            reader.readAsDataURL(file); //base64
            //接收到图片时触发onload
            reader.onload = function(e) {
                var result = reader.result;
                console.log(result);
                document.getElementById(imgId).src = result;
                document.getElementById(imgId).classList.remove("hide");
                document.getElementById(addId).classList.add("hide");
                document.getElementById(closeId).classList.remove("hide");
            };
        }
        $(function() {
            $(".close").click(function() {
                $(this).addClass("hide");
                $(this)
                    .siblings(".add")
                    .removeClass("hide");
                $(this)
                    .siblings("img")
                    .addClass("hide");
            });
        });
    </script>
</body>

</html>